﻿// *********************************************************
// 
//     Copyright (c) Microsoft. All rights reserved.
//     This code is licensed under the Apache License, Version 2.0.
//     THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//     ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//     IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//     PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
// 
// *********************************************************

using Bio.Util;

namespace Bio.Distributions.Converters
{
    /// <summary>
    /// Converts Integer to SufficientStatistics.
    /// </summary>
    public class IntToSufficientStatisticsConverter : ValueConverter<int, SufficientStatistics>
    {
        /// <summary>
        /// Instantiate a new instance of IntToSufficientStatistics class.
        /// </summary>
        public IntToSufficientStatisticsConverter() : base(i => DiscreteStatistics.GetInstance(i), stats => (int)stats.AsDiscreteStatistics()) { }
    }
}
